public class lianxi1 {
    public static void main(String[] args) {
        int arr[] = {1, 2, 3, 5, 7, 2, 3, 5, 9};
        System.out.println(max_s(arr));
        int sum = 0;
        for(int i = 1;i<=100;i++){
            if (is_su_shu(i)==1){
                sum += i;
            }
        }
        System.out.println(sum);

    }
    public static int max_s(int arr1[]){
        int min_arr = 0;
        for (int i = 0;i < arr1.length;i++) {
            if (arr1[i] > min_arr) {
                min_arr = arr1[i];
            }
        }
        return min_arr;
    }
    public static int is_su_shu(int num){
        if (num <= 1){
            return 0;
        }
        for (int i = 2; i <=Math.ceil(Math.sqrt(num)); i++) {
            if (num % i == 0 && i!=num) {
                return 0;
            }
        }
        return 1;
    }
}
